/************************************************************************
* @Copyright: 2023-2024
* @FileName:
* @Description: RTC-SFU
* @Version: 1.0.0
* @Author: Jackie Ou
* @CreateTime: 2023-11-1
*************************************************************************/

#pragma once

#include <string>

#include "controller/types.h"

class Message
{
public:
    static srv::Json parse(const std::string& raw);
    
    static srv::Json createRequest(const std::string& method, const srv::Json& data);
    
    static srv::Json createSuccessResponse(const srv::Json& request, const srv::Json& data);
    
    static srv::Json createErrorResponse(const srv::Json& request, int errorCode, const std::string& errorReason);
    
    static srv::Json createNotification(const std::string& method, const srv::Json& data);
};
